<?php
/**
 * 管理员权限组
 *
 * @copyright  Copyright (c) 2015-2025 NcPHP Inc. (http://www.ncphp.com)
 * @license    http://www.ncphp.com
 * @link       http://www.ncphp.com
 * @author	   NcPHP Team
 * @since      File available since Release v1.1
 */
defined('InNcPHP') or exit('Access Invalid!');

class admin_groupModel extends Model{

	public function __construct(){
		parent::__construct('admin_group');
	}

	public function getAdminGroupList($condition = array(), $field = '*', $page = 0, $order = 'group_id desc'){
		return $this->field($field)->where($condition)->page($page)->order($order)->select();
	}

	public function getAdminGroupInfo($condition = array(), $field = '*'){
		return $this->field($field)->where($condition)->find();
	}

	public function addAdminGroup($param){
		return $this->insert($param);
	}

	public function updateAdminGroup($condition, $param){
		return $this->where($condition)->update($param);
	}

	public function delAdminGroup($condition){
		return $this->where($condition)->delete();
	}

    public function getby_gid($group_id){
        return $this->field('*')->where(array('group_id'=>$group_id))->find();
    }

}
?>